home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97a.txt
/
000130_icon-group-sender _Tue Jun 10 14:00:39 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Received: from kingfisher.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Tue, 10 Jun 1997 12:28:00 MST
Received: by kingfisher.CS.Arizona.EDU; (5.65v3.2/1.1.8.2/08Nov94-0446PM)
id AA08374; Tue, 10 Jun 1997 12:28:00 -0700
Sender: rpereda@micro.ti.com
Message-Id: <339DA457.592990BB@micro.ti.com>
Date: Tue, 10 Jun 1997 14:00:39 -0500
From: Ray Pereda <rpereda@micro.ti.com>
Organization: Texas Instruments
X-Mailer: Mozilla 3.0Gold (X11; I; SunOS 4.1.4 sun4m)
Mime-Version: 1.0
To: Stuart Robinson <Stuart.Robinson@anu.edu.au>
Cc: icon-group@cs.arizona.edu
Subject: Re: searching with variables
References: <Stuart.Robinson-1006972230400001@asianstmg-221.anu.edu.au>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1206
Stuart Robinson wrote:
Consider something like this:
sparrow:[icon] ==> more vl.icn
procedure main()
line := "abc al el abc il ol abc ul"
V := 'aeiou'
line ? {
while (tab(upto(V)) & a := move(1) & b := ="l" ) do {
write("matched = ", a, b)
}
}
end
sparrow:[icon] ==> vl
matched = al
matched = el
matched = il
matched = ol
matched = ul
-ray
>
> A quick question. If you wanted to use the function find() to search for
> a particular strings of characters, how would it be possible to define
> character variables? For example, suppose you want to search for the
> following sequences
>
> al
> el
> il
> ol
> ul
>
> which are really just Vl (where V stands for a vowel). Could you simply
> define a character set for vowels (V := 'aeiou') and then refer to that
> character set in the find() function? If so, what would it look like? I
> tried something like the following and it didn't work.
>
> find( V || "l")
>
> I realise it's a pretty trivial task but I don't have the manual at the
> moment and I'd like an answer within the next couple of days. Thanks in
> advance.
>
> --
> Stuart Robinson <Stuart.Robinson@anu.edu.au>
> The Australian National University